package study.javaClassSingletonMuiltTest;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import study.config.AppConfig;

/**
 * @author: chengchao
 * @description:
 * @date: create in 2021/9/14
 **/
public class SingletonMuiltTest {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        DefaultListableBeanFactory defaultListableBeanFactory = applicationContext.getDefaultListableBeanFactory();

        Aa aa = defaultListableBeanFactory.getBean(Aa.class);
        System.out.println(new String(aa.toString().getBytes()));
        applicationContext.close();
    }
}
